/**
 *
 */
package com.ybkj.daijia.server.service.impl;

import com.ybkj.daijia.server.service.MemberRechargeRecordService;
import org.springframework.stereotype.Service;

/**
 * @author Shine
 *
 */
@Service
public class DefaultMemberRechargeRecordService implements MemberRechargeRecordService {

//	public Page<MemberRechargeRecord> queryAll(Long memberId) {
//		
//		Pageable pageable = new PageRequest(Pager.getPage(), Pager.getLimit());
//		
//		Map<String, Object> params = new HashMap<String, Object>();
//		params.put("memberId", memberId);
//		params.put("offset", Pager.getOffset());
//		params.put("size", Pager.getLimit());
//		
//		List<MemberRechargeRecord> content = memberRechargeRecordMapper.selectByPage(params);
//		long total = memberRechargeRecordMapper.countByPage(params);
//		
//		return new PageImpl<MemberRechargeRecord>(content, pageable, total);
//	}

//	@Transactional(rollbackFor=Exception.class)
//	public MemberRechargeRecord insertRecord(MemberRechargeRecord memberRechargeRecord) {
//		
//		memberRechargeRecordMapper.insertRecord(memberRechargeRecord);
//
//		return memberRechargeRecord;
//	}

//	@Override
//	@Transactional(rollbackFor=Exception.class)
//	public int updateByPrimaryKey(MemberRechargeRecord record) {
//		
//		return memberRechargeRecordMapper.updateByPrimaryKey(record);
//	}

//	public MemberRechargeRecord findOne(Long id) {
//		
//		return memberRechargeRecordMapper.selectByPrimaryKey(id);
//	}

//	@Override
//	public Page<MemberRechargeRecord> queryAll(Long memberId, Date start,Date end) {
//		
//		
//		Pageable pageable = new PageRequest(Pager.getPage(), Pager.getLimit());
//		
//		Map<String, Object> params = new HashMap<String, Object>();
//		params.put("memberId", memberId);
//		if(null != start){
//			params.put("start", start);
//		}
//		if(null != end){
//			params.put("end", end);
//		}
//		params.put("offset", Pager.getOffset());
//		params.put("size", Pager.getLimit());
//		
//		List<MemberRechargeRecord> content = memberRechargeRecordMapper.selectByPage(params);
//		long total = memberRechargeRecordMapper.countByPage(params);
//		
//		return new PageImpl<MemberRechargeRecord>(content, pageable, total);
//		
//	}

//	@Override
//	public Page<MemberRechargeRecord> rechargeRecord(Long memberId, Integer page,Integer limit) {
//		
//		Pageable pageable = new PageRequest(page, limit);
//		
//		Map<String, Object> params = new HashMap<String, Object>();
//		params.put("memberId", memberId);
//		params.put("offset",page * limit);
//		params.put("size", limit);
//		
//		List<MemberRechargeRecord> content = memberRechargeRecordMapper.selectByPage(params);
//		long total = memberRechargeRecordMapper.countByPage(params);
//		
//		return new PageImpl<MemberRechargeRecord>(content, pageable, total);
//	}

//	@Override
//	public Page<MemberRechargeRecord> pageByMembmer(Long memberId,Integer page, Integer limit) {
//		
//		Pageable pageable = new PageRequest(page, limit);
//		
//		Map<String, Object> params = new HashMap<String, Object>();
//		params.put("memberId", memberId);
//		params.put("offset",page * limit);
//		params.put("size", limit);
//		
//		List<MemberRechargeRecord> content = memberRechargeRecordMapper.selectByPage(params);
//		long total = memberRechargeRecordMapper.countByPage(params);
//		
//		return new PageImpl<MemberRechargeRecord>(content, pageable, total);
//	}

//	@Override
//	public List<MemberRechargeRecord> findAll() {
//		
//		return memberRechargeRecordMapper.selectAll();
//	}
}